{{define "system/position/edit"}}
    {{template "layout_form" .}}
{{end}}
{{define "content"}}
<form class="form-horizontal m" id="form-edit">
    <input type="hidden" name="id" value="{{.info.Id}}">
    <div class="form-group">
        <label class="col-sm-3 control-label is-required">岗位名称：</label>
        <div class="col-sm-8">
            <input type="text" name="name" value="{{.info.Name}}" class="form-control" required autocomplete="off"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label is-required">岗位编码：</label>
        <div class="col-sm-8">
            <input type="text" name="pos_key" value="{{.info.PosKey}}" class="form-control" required autocomplete="off"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label is-required">排序：</label>
        <div class="col-sm-8">
            <input type="number" name="list_sort" value="{{.info.ListSort}}" class="form-control" required autocomplete="off"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label is-required">状态：</label>
        <div class="col-sm-8">
            <label class="radio-box">
                <input type="radio" name="status" value="0" {{if eq $.info.Status "0"}} checked {{end}}/> 隐藏
            </label>
            <label class="radio-box">
                <input type="radio" name="status" value="1" {{if eq $.info.Status "1"}} checked {{end}}/> 显示
            </label>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label ">备注：</label>
        <div class="col-sm-8">
            <textarea name="note" class="form-control" placeholder="请输入备注">{{.info.Note}}</textarea>
        </div>
    </div>
</form>
{{end}}

{{define "script"}}
<script>
    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(window.b5go.oesUrl, $('#form-edit').serialize());
        }
    }
</script>
{{end}}
